<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        #root {
            display: flex;
            flex-wrap: wrap;
        }
    </style>
</head>

<body>
    <div id="root"></div>
    <script>
        function randomHexColor() {
            return "#" + ("0000" + (Math.random() * 0x1000000 << 0).toString(16)).substr(-6);
        }
        setTimeout(function () {
            var k = 0;
            var root = document.getElementById("root");
            for (var i = 0; i < 100000; i++) {
                k += new Date - 0;
                var el = document.createElement("div");
                // el.innerHTML = k;
                root.appendChild(el);
                el.style.cssText = `background:${randomHexColor()};height:3px;width:3px`;
            }
        }, 1000);
    </script>
</body>

</html>